-- GENERATED SPELL FOR [Monstrous Kaliri] --


function spell0_23051(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(31553,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23051', 10326, 1)
end

function spell1_23051(pUnit, Event) --@Rend,n/a--
pUnit:FullCastSpellOnTarget(13738,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23051', 15000, 1)
end

function spell2_23051(pUnit, Event) --@Swoop,n/a--
pUnit:FullCastSpellOnTarget(5708,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23051', 2300, 1)
end

function Sorts_23051(pUnit, Event)
local choix_sorts_23051 = math.random(0, 2)
if choix_sorts_23051 == 0 then
pUnit:RegisterEvent('spell0_23051', 1, 1)
end
if choix_sorts_23051 == 1 then
pUnit:RegisterEvent('spell1_23051', 1, 1)
end
if choix_sorts_23051 == 2 then
pUnit:RegisterEvent('spell2_23051', 1, 1)
end
end

function mob23051_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23051', math.random(1500, 3000), 1)
end

function mob23051_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23051_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23051_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23051, 1, 'mob23051_Action')
RegisterUnitEvent(23051, 2, 'mob23051_Leave')
RegisterUnitEvent(23051, 3, 'mob23051_Kill')
RegisterUnitEvent(23051, 4, 'mob23051_Die')
